﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageSERIX.Master" AutoEventWireup="true"
    CodeBehind="Programas.aspx.cs" Inherits="SERIX.Programas" Title="Programas" %>

<%@ Register src="Controles/Navegador.ascx" tagname="Navegador" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="97%" border="0" cellspacing="0" cellpadding="2" align="center">
        <tr>
            <td class="secao_titulo" style="width: 284px">
                Programas<hr class="linhaHorizontal" style="width: 740px" />
            </td>
        </tr>
    </table>
    <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
        <tr>
            <td align="left" class="barra" style="height: 16px; background-color: white-Smoke;">
                <asp:Button ID="btnNovo" runat="server" Font-Bold="True" OnClick="btnNovo_Click"
                    TabIndex="1" Text="Novo" UseSubmitBehavior="False" Width="78px" />
            </td>
        </tr>
        <tr>
            <td align="center" class="grid_titulo" style="visibility: hidden">
                <span style="color: #FFFFFF">Filtrar: </span>
                <asp:TextBox ID="txtFiltrar" runat="server" MaxLength="55" TabIndex="2" Width="127px"></asp:TextBox>
                <span style="color: #FFFFFF">&nbsp; por&nbsp; </span>
                <asp:DropDownList ID="ddlPor" runat="server" TabIndex="3" Width="128px">
                    <asp:ListItem />
                    <asp:ListItem Value="Nome">Nome</asp:ListItem>
                    <asp:ListItem Value="Ano">Ano</asp:ListItem>
                </asp:DropDownList>
                <span style="color: #FFFFFF">&nbsp; Tipos de Programa: </span>
                <asp:DropDownList ID="ddlTipoPrograma" runat="server" TabIndex="3" 
                    Width="250px" DataSourceID="SqlTiposProgramas" DataTextField="DSC_TPO_PROG" 
                    DataValueField="IDT_TPO_PROG" onprerender="ddlTipoPrograma_PreRender">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlTiposProgramas" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                    
                    SelectCommand="SELECT &quot;IDT_TPO_PROG&quot;, &quot;DSC_TPO_PROG&quot; FROM &quot;SRX_TIPOS_PROGRAMAS&quot; ORDER BY  &quot;DSC_TPO_PROG&quot;">
                </asp:SqlDataSource>
                &#160;&#160;<asp:Button ID="btnPequisar" runat="server" Font-Bold="True" OnClick="btnPequisar_Click"
                    TabIndex="5" Text="Pesquisar" Width="80px" />
                &#160;&#160;<asp:Button ID="btnTodos" runat="server" Font-Bold="True" OnClick="btnTodos_Click"
                    TabIndex="6" Text="Todos" UseSubmitBehavior="False" Width="80px" />
            </td>
        </tr>
        <tr>
            <td align="left" style="color: #000000">
                <asp:Label ID="lblFiltro" runat="server" CssClass="filtro" TabIndex="-1" Text="Filtro: "></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
                <asp:GridView ID="gridView" runat="server" AutoGenerateColumns="False" CssClass="grid"
                    OnRowDataBound="gridView_RowDataBound" EmptyDataText="Nenhum registro encontrado.">
                    <AlternatingRowStyle CssClass="row_alter" />
                    <Columns>
                        <asp:BoundField DataField="IDT_PROG" HeaderText="IDT" Visible="False" />
                        <asp:BoundField DataField="NOM_PROG" HeaderText="Programa" ItemStyle-Width="820px">
                            <FooterStyle HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle Width="820px" HorizontalAlign="Left"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="DAT_INI" HeaderText="Início" ItemStyle-Width="220px" 
                            Visible="False">
                            <ItemStyle Width="220px" HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="DAT_TER" HeaderText="Término" 
                            ItemStyle-Width="220px" Visible="False">
                            <ItemStyle Width="220px" HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
                        <asp:TemplateField FooterText="Detalhes" HeaderText="Detalhes" 
                            ItemStyle-Width="70px" Visible="False">
                            <ItemTemplate>
                                <asp:HyperLink ID="Detalhes_HyperLink" runat="server" ImageUrl="Imagens/botoes/Detail.png">Detalhes</asp:HyperLink>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField FooterText="Editar" HeaderText="Editar" ItemStyle-Width="70px">
                            <ItemTemplate>
                                <asp:HyperLink ID="Editar_HyperLink" runat="server" ImageUrl="Imagens/botoes/Edit.png">Editar</asp:HyperLink>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField FooterText="Excluir" HeaderText="Excluir" 
                            ItemStyle-Width="70px">
                            <ItemTemplate>
                                <asp:HyperLink ID="Excluir_HyperLink" runat="server" ImageUrl="Imagens/botoes/Delete.png">Excluir</asp:HyperLink>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Opções" Visible="False">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlOpcoes" runat="server" AutoPostBack="True" Height="17px"
                                    OnSelectedIndexChanged="ddlOpcoes_SelectedIndexChanged" Width="141px">
                                    <asp:ListItem Selected="True" Value="  ">
                                    </asp:ListItem>
                                    <asp:ListItem>Ações</asp:ListItem>
                                    <asp:ListItem>Áreas de Ação</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataRowStyle CssClass="emptyrow" />
                    <FooterStyle CssClass="footer" />
                    <HeaderStyle CssClass="header" />
                    <PagerStyle CssClass="pager" />
                    <RowStyle CssClass="row" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
                <uc1:Navegador ID="Navegador1" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
            </td>
        </tr>
    </table>
</asp:Content>
